﻿<Window
    x:Class="Sara.Window1" Name="Window"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Sara" Height="300" Width="300" ResizeMode="NoResize" 
        WindowStartupLocation="CenterScreen" WindowStyle="ToolWindow" 
        AllowsTransparency="False" Background="Transparent" WindowState="Maximized">    
    <Grid>
        <Rectangle Name="ActiveIndicator" Stroke="Black" StrokeLineJoin="Round" 
                   StrokeEndLineCap="Round" Margin="12,12,12,0" StrokeDashCap="Round" 
                   StrokeStartLineCap="Round" RadiusX="10" RadiusY="10" Height="40" 
                   VerticalAlignment="Top" Opacity="0.6" StrokeThickness="0"
                   Fill="#FF88FF88">
            <Rectangle.Effect>
                <DropShadowEffect ShadowDepth="0" Color="#FF88FF88" BlurRadius="30" Opacity="1" /> 
            </Rectangle.Effect>
        </Rectangle>
        <Label Content="Loading..." 
               Height="40" HorizontalAlignment="Center" Name="ActiveIndicatorLabel" 
               VerticalAlignment="Top" Width="254" HorizontalContentAlignment="Center" 
               FontFamily="Verdana" FontSize="14" FontStretch="Expanded" 
               VerticalContentAlignment="Center" Margin="0,12,0,0">
            <Label.Effect>
                <DropShadowEffect ShadowDepth="0" Color="White" BlurRadius="5" Opacity="1" />
            </Label.Effect>
        </Label>
        <TextBlock Margin="12,88,12,20" Name="textBlock1" Text="" 
                   TextWrapping="Wrap" Foreground="White" 
                   Background="#AA000000" FontSize="16" FontFamily="Segoe UI" />
    </Grid>
    
    <Window.Resources>
        <Storyboard x:Key="ActivateIndicatorSb">
            <ColorAnimation
                                Storyboard.TargetName="ActiveIndicator"
                                Storyboard.TargetProperty="Fill.Color"
                                From="#FFFF8888" To="#FF88FF88"
                                Duration="0:0:0.25" />
            <ColorAnimation
                                Storyboard.TargetName="ActiveIndicator"
                                Storyboard.TargetProperty="Effect.Color"
                                From="#FFFF8888" To="#FF88FF88"
                                Duration="0:0:0.25" />
        </Storyboard>
        
        <Storyboard x:Key="DeactivateIndicatorSb">
            <ColorAnimation
                                Storyboard.TargetName="ActiveIndicator"
                                Storyboard.TargetProperty="Fill.Color"
                                From="#FF88FF88" To="#FFFF8888"
                                Duration="0:0:3" />
            <ColorAnimation
                                Storyboard.TargetName="ActiveIndicator"
                                Storyboard.TargetProperty="Effect.Color"
                                From="#FF88FF88" To="#FFFF8888"
                                Duration="0:0:3" />
        </Storyboard>
        
        <Storyboard x:Key="FadeWindowOut" >
            <ColorAnimation
                                Storyboard.TargetName="Window"
                                Storyboard.TargetProperty="Background.Color"
                                From="Transparent" To="#EE000000"
                                Duration="0:0:5" />
            <ColorAnimation
                                Storyboard.TargetName="ActiveIndicator"
                                Storyboard.TargetProperty="Fill.Color"
                                From="#FFFF8888" To="#FF220000"
                                Duration="0:0:5" />
            <ColorAnimation
                                Storyboard.TargetName="ActiveIndicator"
                                Storyboard.TargetProperty="Effect.Color"
                                From="#FFFF8888" To="#FF220000"
                                Duration="0:0:5" />
        </Storyboard>

        <Storyboard x:Key="FadeWindowIn" >
            <ColorAnimation
                                Storyboard.TargetName="Window"
                                Storyboard.TargetProperty="Background.Color"
                                From="#EE000000" To="Transparent"
                                Duration="0:0:0.25" />
            <ColorAnimation
                                Storyboard.TargetName="ActiveIndicator"
                                Storyboard.TargetProperty="Fill.Color"
                                From="#FF220000" To="#FFFF8888"
                                Duration="0:0:0.25" />
            <ColorAnimation
                                Storyboard.TargetName="ActiveIndicator"
                                Storyboard.TargetProperty="Effect.Color"
                                From="#FF220000" To="#FFFF8888"
                                Duration="0:0:0.25" />
        </Storyboard>

    </Window.Resources>
</Window>
   
